<?php require_once ADMINVIEWPATH.'admin_header.php'; ?>
<?php require_once ADMINVIEWPATH.'admin_menu.php'; ?>
<!-- Page Content -->
            <div class="page-content">
                <!-- Page Breadcrumb -->
                <div class="page-breadcrumbs">
                    <ul class="breadcrumb">
                        <li>
                            <i class="fa fa-home"></i>
                            <a href="/luckydog/index">首页</a>
                        </li>
                        <li>
                            <a href="#">系统设置</a>
                        </li>
                        <li class="active">
                            积分管理
                        </li>
                    </ul>
                </div>
                <!-- /Page Breadcrumb -->
                <!-- Page Body -->
                <div class="page-body">
					<h6 class="row-title before-azure">积分设置&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h6>
                    <div class="row">
                        <?php
                          if (!empty($point_list)):
                            foreach ($point_list as $row):
                            if($row['type'] == "int"):
                          ?>
                        <div class="col-lg-3 col-sm-6 col-xs-12">
                            <div class="databox radius-bordered databox-shadowed databox-graded databox-vertical">
                                <div class="databox-top bg-blue no-padding">
                                    <div class="databox-row row-2"></div>
                                    <div class="databox-row row-10">
                                        <div class="databox-sparkline">
                                            <span data-sparkline="bar" data-height="42px" data-width="100%" data-barcolor="#11a9cc" data-negbarcolor="#11a9cc" data-zerocolor="#11a9cc" data-barwidth="7px" data-barspacing="3px">
                                                <?=$row['points']?>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="databox-bottom text-align-center">
                                    <span class="databox-text"><?=$row['des']?></span>
                                    <?php if(check_authorize("System","Pointsetting","edit")):?>
                                    <span class="databox-text pull-right editCat" data_type="<?=$row['type']?>" data_id="<?=$row['id']?>">修改</span>
                                    <?php endif;?>
                                </div>
                            </div>
                        </div>
                        <?php
                            endif;
                            endforeach;
                            endif;
                          ?>
                    </div>
                    <h6 class="row-title before-pink"><?=$point_list[8]['des']?></h6>
                    <div class="row">
                        <?php
                          if (!empty($point_list)):
                            foreach ($point_list as $row):
                            if($row['type'] == "text"):
                          ?>
                          <div class="col-lg-5 col-sm-6 col-xs-12">
                            <div class="databox  bg-white radius-bordered databox-shadowed databox-vertical">
                                <div class="databox-top bg-white ">
                                    <div class="text-align-left padding-top-10 padding-left-10 ">
                                        <span class="databox-text lightcarbon no-margin"><?=$row['points']?></span>
                                    </div>
                                </div>
                                <div class="databox-top bg-white">
                                    <?php if(check_authorize("System","Pointsetting","edit")):?>
                                    <span class="databox-text lightcarbon pull-right padding-10 editCat" data_type="<?=$row['type']?>" data_id="<?=$row['id']?>">修改</span>
                                    <?php endif;?>
                                </div>
                            </div>
                        </div>
                        <?php
                        endif;
                        endforeach;
                        endif;
                      ?>
                    </div>
                </div>
            </div>
            <!-- /Page Body -->
        </div>
        <!-- /Page Content -->
<script src="<?php echo STATICURL; ?>js/jquery-2.0.3.min.js"></script>
<script src="<?php echo STATICURL; ?>layer/layer.js"></script>
<?php require_once ADMINVIEWPATH.'admin_footer.php'; ?>
<script>
    $(document).ready(function(){
        $('.editCat').on('click', function(){
            //iframe窗
            var id = $(this).attr("data_id");
            var type = $(this).attr("data_type");
            layer.open({
                type: 2,
                title: '修改',
                shade: [0.5, '#000'],
                shadeClose: false,
                maxmin: true, //开启最大化最小化按钮
                area: ['550px', '240px'],
                content: '/luckydog/pointsetting/edit?id='+id+"&type="+type
            });
        });
    });
</script>



